﻿<?php
header("Content-type:text/html;charset=utf-8");
?>
<html>
<head>


</style><head><body>
<meta name="baidu-site-verification" content="gFRNXpjoF8" />
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<p>
  <style type="text/css">
<!--
<!--html5 speedup-->
<style>
::-webkit-scrollbar{width:8px}
::-webkit-scrollbar-track-piece{background-color:#d2d2d2}
::-webkit-scrollbar-thumb{background:#888;}
::-webkit-scrollbar-thumb:hover{background-color:#999;}
#grid {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: -11;
margin: 0;
padding: 0;
overflow: hidden;
background: url() repeat;
}
body,td,th {
	font-family: Georgia, Times New Roman, Times, serif;
}
a {
	font-family: Courier New, Courier, monospace;
	color: #6600FF;
}
a:visited {
	color: #000000;
	text-decoration: none;
}
a:hover {
	color: #000000;
	text-decoration: underline;
}
a:active {
	color: #000000;
	text-decoration: none;
}
a:link {
	color: #000000;
	text-decoration: none;
}
.STYLE30 {color: #000000}
.STYLE32 {font-size: small}
.STYLE33 {color: #000000; font-size: small; }
</style>
<div class="container">
  <p>
    <script src="http://libs.baidu.com/jquery/1.9.1/jquery.min.js"></script> 
    <script src="http://lib.sinaapp.com/js/bootstrap/2.3.1/js/bootstrap.min.js"></script>
    <script src="http://cdnjs.bootcss.com/ajax/libs/jquery-backstretch/2.0.3/jquery.backstretch.min.js"></script>
    <script>



	// Create an array of images that you'd like to use
var images = ["http://img.ivsky.com/img/bizhi/pic/201304/26/caise_guangban-014.jpg","http://img.ivsky.com/img/bizhi/pic/201304/26/caise_guangban-017.jpg","http://b.zol-img.com.cn/desk/bizhi/image/5/1440x900/1409624128806.jpg","http://img.ivsky.com/img/bizhi/pic/201304/26/caise_guangban-014.jpg","http://b.zol-img.com.cn/desk/bizhi/image/5/1440x900/1409021422417.jpg"];
	
	// A little script for preloading all of the images
	// It's not necessary, but generally a good idea
	$(images).each(function(){
	   $('<img/>')[0].src = this; 
	});
	
	// The index variable will keep track of which image is currently showing
	var index = 0;
	
	// Call backstretch for the first time,
	// In this case, I'm settings speed of 500ms for a fadeIn effect between images.
	$.backstretch(images[index], {speed: 1000});
	
	// Set an interval that increments the index and sets the new image
	// Note: The fadeIn speed set above will be inherited
	setInterval(function() {
		index = (index >= images.length - 1) ? 0 : index + 1;
		$.backstretch(images[index]);
	}, 10000);




function down(id)
{
	$("#msg").html('Download starting ,Please Wait.');
	$("#msgbox").fadeIn();
	htmlobj=$.ajax({url:"d.php?act=down&id="+id,async:false});
	if(htmlobj.responseText!="error")
	{
	location=htmlobj.responseText;
	$("#msgbox").fadeOut();
	
	}
	else
	{
		$("#msg").html("Download error ,Please try again.");
		$("#msgbox").fadeIn();
		
	}
}

 // popover demo
    $("a[data-toggle=popover]")
      .popover()
      .click(function(e) {


        e.preventDefault()
      })
  </script>
    </marquee>?>
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
<title>手动更新sid-过客</title>
<link rel="shortcut icon" href="icon.png"/>
<link rel="bookmark" href="icon.png"/>
<link rel='stylesheet' type='text/css' href='css.css'>
<link rel="stylesheet" type="text/css" href="css/register.css"/>
</head>
<body>
<?php
require 'connect.php';
include "./function.php";
$qid=$_GET['qid'];
$mysql = mysql_query("SELECT * FROM qqlist WHERE qid='$qid'");
$sql= mysql_fetch_array($mysql);
$user=$sql['myqq'];
$qq=$sql['qq'];
$pw=tesy_decrypt($sql['pw']);

if($_COOKIE["SHANIUUSER"]!=$sql['myqq'])
{
echo '<div class="signup_container"><h1 class="signup_title">非法闯入！</h1><br>小伙子！你想干嘛？这不是你的QQ！<br><br><center><a href="./user.php">返回用户中心</a></center></div>';
exit();
}

echo '<div class="signup_container">
<h1 class="signup_title">sid手动更新界面</h1><br><br>';

//挂Q判断开始
if ($qq==""){
echo "QQ帐号不能为空<br></div>";
}elseif($pw==""){
echo "QQ密码不能为空<br></div>";
}elseif (isset($_POST['yzm'])){
$out=addqqyyzm($_POST['qq'],$_POST['pw'],$_POST['r'],$_POST['extend'],$_POST['r_sid'],$_POST['sid'],$_POST['ip'],$_POST['hidpw'],$_POST['verify']);
}else{
$out=addqqwyzm($qq,$pw);
}
//@@@@@@@@@@@@@@@@@@
if (@eregi("您输入的账号不存在",$out)){
echo "系统提示:您输入的账号不存在";
}elseif(@eregi("操作异常",$out)){
$a=explode('请输入上图字符(不区分大小写)：',$out);
$outt=$a[0];
$b=$a[1];
$img=explode('src="',$outt);
$img=explode('" alt="',$img[1]);
$rt=explode('name="r" value="',$out);
$rw=explode('"/>',$rt[1]);
$extendt=explode('name="extend" value="',$out);
$extendw=explode('"/>',$extendt[1]);
$r_sidt=explode('name="r_sid" value="',$out);
$r_sidw=explode('"/>',$r_sidt[1]);
$login_urlt=explode('name="login_url" value="',$out);
$login_urlw=explode('"/>',$login_urlt[1]);
$sidt=explode('name="sid" value="',$out);
$sidw=explode('"/>',$sidt[1]);
$ipt=explode('name="rip" value="',$out);
$ipw=explode('"/>',$ipt[1]);
$hidpwt=explode('name="hexpwd" value="',$out);
$hidpww=explode('"/>',$hidpwt[1]);
echo '遇到QQ验证码:<br /><img src="'.$img[0].'"><br><br>';
echo '<form name="aa" action="" method="post">';
echo '<input type="hidden" name="qq" value="'.$qq.'"/>';
echo '<input type="hidden" name="pw" value="'.$pw.'"/>';
echo '<input type="hidden" name="r" value="'.$rw[0].'"/>';
echo '<input type="hidden" name="extend" value="'.$extendw[0].'"/>';
echo '<input type="hidden" name="r_sid" value="'.$r_sidw[0].'"/>';
echo '<input type="hidden" name="login_url" value="'.$login_urlw[0].'"/>';
echo '<input type="hidden" name="sid" value="'.$sidw[0].'"/>';
echo '<input type="hidden" name="ip" value="'.$ipw[0].'">';
echo '<input type="hidden" name="hidpw" value="'.$hidpww[0].'">';
echo '<input type="text" name="verify" value="" style="width:100px">';
echo '<br />';
echo '<br><input type="submit" name="yzm" value="马上登录" style="width:100px">';
echo '</form>';
}elseif(@eregi("密码不正确",$out)){
global $qid;
echo "您的QQ帐号或密码不正确<br><br><br><center><a href='set.php?qid={$qid}'>返回中心</a>&nbsp&nbsp&nbsp&nbsp&nbsp<a href='javascript:history.go(0)'>刷新页面</a></center></div>";
}elseif(@eregi("系统繁忙",$out)){
echo "系统繁忙为您获取SID码<br><br><br><center><a href='set.php?qid={$qid}'>返回中心</a>&nbsp&nbsp&nbsp&nbsp&nbsp<a href='javascript:history.go(0)'>刷新页面</a></center></div>";
}elseif(1){
$out=explode('sid=',$out);
$sid=substr($out[1],0,24);
$url='http://ish.z.qq.com/infocenter_v2.jsp?B_UID='.$qq.'&sid='.$sid.'&g_ut=1';
$yz_get=file_get_contents($url);
if(!strstr($yz_get,'个人中心')){
echo 'sid提取失败，请点击下面链接提取<br><br>';
echo "<center><a href='sid.html?qid={$qid}'>点击进入手动提取sid教程</a></center>";
echo "<center><a href='srsid.php?qid={$qid}'>点击手动输入sid</a></center>";
exit;
}
mysql_query("UPDATE qqlist SET sid='$sid',newsid='yes' WHERE qq='".$qq."'");
//呼出提示
echo "sid更新成功<br><br><br><center><a href='set.php?qid={$qid}'>返回中心</a>&nbsp&nbsp&nbsp&nbsp&nbsp<a href='javascript:history.go(0)'>刷新页面</a></center></div>";
}else{
echo "<br />系统提示:发生错误<br><br><br><center><a href='set.php?qid={$qid}'>返回中心</a>&nbsp&nbsp&nbsp&nbsp&nbsp<a href='javascript:history.go(0)'>刷新页面</a></center></div>";
}
//@@@@@@@@@@@@@@@@@@

?>